package SwingContainer;

import javax.swing.*;

public class Window02Main extends JFrame {
    JButton button1=new JButton("按钮1");
    JTextField textField=new JTextField();
    JCheckBox checkBox=new JCheckBox("复选框1");

    public Window02Main(String title){
        super(title);
        JPanel jPanel=new JPanel();
        this.setContentPane(jPanel);
//        this.add(jPanel);
        jPanel.setLayout(null);
        button1.setBounds(200,100,100,50);
        textField.setBounds(170,10,160,20);
        checkBox.setBounds(0,0,120,20);
        jPanel.add(button1);
        jPanel.add(textField);
        jPanel.add(checkBox);
    }
}
